package com.tongji.housediy.view.component3D
{
	import alternativa.engine3d.core.Vertex;
	import alternativa.engine3d.materials.Material;
	import alternativa.engine3d.objects.Mesh;
	
	public class Window extends Mesh
	{
		public function Window(point1x:Number,point1y:Number,point2x:Number,point2y:Number,height1:Number,height2:Number,material:Material)
		{
			var v1:Vertex = this.addVertex(point1x, point1y, height1, 0, 0);
			var v2:Vertex = this.addVertex(point2x, point2y, height1, 1, 0);
			var v3:Vertex = this.addVertex(point2x, point2y, height2, 1, 1);
			var v4:Vertex = this.addVertex(point1x, point1y, height2, 0, 1);
			this.addFace(Vector.<Vertex>([v1, v2, v3, v4]), material);
			this.calculateFacesNormals();
		}
	}
}